const mongooes = require("mongoose")

const MONGODB_URL = "mongodb://127.0.0.1:27017/jianshu"

module.exports = () => {
  mongooes.connect(MONGODB_URL, { useUnifiedTopology: true, useNewUrlParser: true })
  .then(res => {
    console.log("db connect success");
  })
  .catch(err => {
    console.log("error", err);
  })
}